# makefile for tiny web
CC		= gcc
CFLAGS	= -Wall -O2 -s -pthread -I ./include
OBJECTS	= ./src/open.o ./src/rio.o ./src/sbuf.o ./src/log.o ./src/init.o ./src/http.o ./src/child.o ./src/tiny.o

tiny: $(OBJECTS)
	$(CC) $(CFLAGS) $(OBJECTS) -o $@

.c.o: 
	$(CC) $(CFLAGS) -c $< -o $@

run:
	sudo ./tiny

kill:
	sudo killall tiny

clean:
	rm -f ./tiny ./src/*.o
